/*
 * @Author: hjw
 * @Date: 2023-09-11
 * @Description: 定义App主要的颜色
 */

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

Color rgba(int a, int b, int c, double d) {
  return Color.fromRGBO(a, b, c, d);
}

class ColorUtils {
  /**
   * 通用基础颜色
   */

  /// APP主体颜色
  static Color color_theme = const Color.fromRGBO(255, 0, 134, 1);
  static Color subject = Color.fromRGBO(255, 0, 134, 1);
  static Color subject_no = Color.fromRGBO(255, 0, 134, 0.4);
  static Color color_theme_03 = Color.fromRGBO(255, 0, 134, 0.3);

  /// 背景颜色
  static Color color_bg = Color.fromRGBO(247, 247, 247, 1);

  /// 导航条颜色
  static Color nav_bar_bg = Colors.white;

  /// 导航条文字的颜色
  static Color nav_bar_title = Color.fromRGBO(48, 49, 51, 1);

  /// 分割线颜色
  static Color color_divider_line = Color.fromRGBO(0, 0, 0, 0.1);

  /// 图片占位颜色
  static Color color_pic_default = Color.fromRGBO(239, 241, 243, 1);

  /// 文字颜色
  static Color text = rgba(48, 49, 51, 1);

  /// 副标题颜色
  static Color text_ = rgba(100, 101, 102, 1);

  /**
   * 其他颜色
   */
  /**价格的颜色  */
  /**
   * 其他颜色
   */

  /// 价格的颜色
  static Color color_price = const Color.fromRGBO(204, 99, 0, 1);
  static Color color_19_20_21 = const Color.fromRGBO(19, 20, 21, 1);
  static Color color_128_128_128 = const Color.fromRGBO(128, 128, 128, 1);
  static Color color_150_151_153 = const Color.fromRGBO(150, 151, 153, 1);
  static Color color_48_49_51 = const Color.fromRGBO(48, 49, 51, 1);
  static Color color_80_80_80 = const Color.fromRGBO(80, 80, 80, 1);
  static Color color_241_102_0 = const Color.fromRGBO(241, 102, 0, 1);
  static Color color_253_64_41 = const Color.fromRGBO(253, 64, 41, 1);
  static Color color_26_26_26 = const Color.fromRGBO(26, 26, 26, 1);
  static Color color_0_153_255 = const Color.fromRGBO(0, 153, 255, 1);
  static Color color_0_153_255_03 = const Color.fromRGBO(0, 153, 255, 0.3);
  static Color color_204_204_204 = const Color.fromRGBO(204, 204, 204, 1);
  static Color color_235_247_255 = const Color.fromRGBO(235, 247, 255, 1);
  static Color color_248_248_250 = const Color.fromRGBO(248, 248, 250, 1);

  /// @description: HexColor
  /// @param {*}
  /// @return {*}
  static Color hexColor(String hexString) {
    if (int.tryParse(hexString.substring(1, 7), radix: 16) == null) {
      hexString = '#999999';
    }
    return Color(int.parse(hexString.substring(1, 7), radix: 16) + 0xFF000000);
  }

  /// @description: 状态栏字体白色
  /// @return {*}
  static SystemUiOverlayStyle stateBarLight = const SystemUiOverlayStyle(
    systemNavigationBarColor: Color(0xFF000000),
    systemNavigationBarDividerColor: null,
    statusBarColor: null,
    systemNavigationBarIconBrightness: Brightness.light,
    statusBarIconBrightness: Brightness.light,
    statusBarBrightness: Brightness.dark,
  );

  /// @description: 状态栏字体黑色
  /// @return {*}
  static SystemUiOverlayStyle stateBarDark = const SystemUiOverlayStyle(
    systemNavigationBarColor: Color(0xFF000000),
    systemNavigationBarDividerColor: null,
    statusBarColor: null,
    systemNavigationBarIconBrightness: Brightness.light,
    statusBarIconBrightness: Brightness.dark,
    statusBarBrightness: Brightness.light,
  );
}
